Smartphone-based deep learning system